package com.gxa.service.impl;
import com.github.pagehelper.PageHelper;
import com.gxa.pojo.Operation;
import com.gxa.dao.OperationMapper;
import com.gxa.service.OperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OperationServiceImpl implements OperationService{
    @Autowired
    private OperationMapper operationMapper;


   // @Override
  //  public boolean selectOperation(Operation operation) {

     //   return operationMapper.selectOperation(operation)>0;
  //  }
     @Override
     public List<Operation> selectOperation(int pageNum, int pageSize) {

         PageHelper.startPage(pageNum, pageSize);

         List<Operation> operation = operationMapper.selectOperation();
         return operation;
     }

    @Override
    public List<Operation> query(Operation operation) {
        return null;
    }

    @Override
    public List<Operation> queryByPage(Operation operation, int page, int size) {
        return null;
    }

    @Override
    public boolean deleteOperation(String operation_type) {
        return operationMapper.deleteOperation(operation_type)>0;
    }

    @Override
    public boolean insertOperation(Operation operation) {
        return false;
    }
}
